<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>金字塔</title>
    <style>
        body{
            font-family: Arial;
        }
    </style>
</head>
<body>
<script>
    for (var i=1; i<=9; i++){
        for (var j=9 - 1 ; j>=i; j--){
            document.write("&nbsp;");
        }
        for(var k=1; k<=2 *i-1;k++){
            document.write("*");
        }
        document.write("<br>")
    }
</script>



<script src="script.js"></script>


</body>
</html>